<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="daoepingjs/script_common.js" type="text/javascript"></script>
<link href="daoepingcss/daoeping.css" rel="stylesheet"
	type="text/css" />
<title><s:text name="pregister" /></title>
</head>
<script type="text/javascript">
	var msg_puser = "<s:text name='null_puser'/>";
	var msg_ppwd = "<s:text name='null_ppwd'/>";
	var msg_prepwd = "<s:text name='null_prepwd'/>";
	var msg_pverifycode = "<s:text name='null_pverifycode'/>";
	var msg_pwd = "<s:text name='same_pwd'/>";
	var msg_userexist = "<s:text name='user_exist'/>";
	var msg_usernotexist = "<s:text name='user_notexist'/>";
	var puser = "<s:text name="username" />";
	var ppwd = "<s:text name="password" />";
	var prepwd = "<s:text name="repassword" />";
	var pverifycode = "<s:text name="verifycode" />";
	var msg_verifycodeexist = "<s:text name="verifycode_exist" />";
	var msg_verifycodenotexist = "<s:text name="verifycode_notexist" />";
</script>


<body >
<s:debug/>
<div align="left">
		<div>
			<table>
				<tr>
					<td width="100"><font color="#CCCCCC"><s:text
								name="pregister" /></font></td>
					<td width="266"><hr align="left" noshade="noshade"
							style="border: 1px dashed #CCCCCC; height: 0px; weight: 300" /></td>
				<tr>
			</table>
		</div>

		<form action="addPUser" method="post" id="myform">
			<p>
				<s:text name="username" />
				<input id="puser" type="text" name="user.username" maxlength="50"   value="${user.username }" 
					onkeyup="value=value.replace(/[^a-zA-Z0-9@_]/g,'')" 
					onblur="verifyExist('puser' , 'verifyUserExist' , 'user.username=');" /> <span id="span_puser">
					<s:property value="errors['user.username'][0]" /></span>
			</p>	
			<p>
				<s:text name="password" />
				
				<input id="ppwd" type="password" name="user.password" maxlength="50" value="${user.password }"
					onkeyup="value=value.replace(/[^a-zA-Z0-9@_]/g,'')" 
					onblur="verifyNull('ppwd')" /> <span id="span_ppwd">	<s:property value="errors['user.password'][0]" /></span>
			</p>
			<p>
				<s:text name="repassword" />
				<input id="prepwd" type="password" name="otherData.repassword" maxlength="50" value="${otherData.repassword }"
					onkeyup="value=value.replace(/[^a-zA-Z0-9@_]/g,'')" 
					onblur="verifyNull('prepwd')" /> <span id="span_prepwd">	<s:property value="errors['otherData.repassword'][0]" /></span>
			</p>
			<p>
				<s:text name="verifycode" />
				<input id="pverifycode" type="text" name="otherData.verifycode" size="6" value="${otherData.verifycode }"
					maxlength="6" onkeyup="value=value.replace(/[^0-9_]/g,'')"   
					onblur="verifyExist('pverifycode' , 'verifyCodeExist' , 'otherData.verifycode=');" /> <img src="view/user/verifycode.jsp">
				<span id="span_pverifycode">	<s:property value="errors['otherData.verifycode'][0]" /></span>
			</p>
			<u><a onclick="mysubmit_pregister()" style="cursor: hand"><s:text
						name="register" /></a></u>
		</form>
	</div>

</body>
</html>